/**
 * 
 */
package com.lion.jacoco.biz;

import net.sf.json.JSONObject;

/**
 * JsonUtil.java. 2011-12-6下午4:11:31 @author LionBule.
 */
public class JsonUtil {
    public static String getJsonStr(Object data) {
        return JSONObject.fromObject(data).toString();
    }
    
    public static String getSuccessfulResult(String msg){
        return JSONObject.fromObject(new RequestResult(true, msg, null)).toString();
    }
    
    public static String getFailedResult(String msg){
        return JSONObject.fromObject(new RequestResult(false, msg, null)).toString();
    }
    
}
